import config from "@/config"
import http from "@/utils/request"

export default {
	sys: {
		getWebsite: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/getWebsite`,
			name: "获取网站信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		getCopyright: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/getCopyright`,
			name: "获取备案信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setWebsite: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/setWebsite`,
			name: "设置网站信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		setCopyright: {
			url: `${config.API_URL}/adminapi/setting.web.web_setting/setCopyright`,
			name: "设置版权备案",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
	storage: {
		lists: {
			url: `${config.API_URL}/adminapi/setting.storage/lists`,
			name: "获取存储引擎列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setup: {
			url: `${config.API_URL}/adminapi/setting.storage/setup`,
			name: "获取备案信息",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/setting.storage/detail`,
			name: "获取备案信息",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
	weapp: {
		getConfig: {
			url: `${config.API_URL}/adminapi/channel.mnp_settings/getConfig`,
			name: "获取小程序配置",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setConfig: {
			url: `${config.API_URL}/adminapi/channel.mnp_settings/setConfig`,
			name: "设置小程序配置",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},

    setparams:{
        url: `${config.API_URL}/adminapi/stock.Switch/all`,
        name: "参数配置",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    editparams:{
        url: `${config.API_URL}/adminapi/stock.Switch/updSwitch`,
        name: "参数修改状态",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
	getTaxRate:{
		url: `${config.API_URL}/adminapi/setting.web.web_setting/getTaxRate`,
		name: "获取税率",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	setTaxRate:{
		url: `${config.API_URL}/adminapi/setting.web.web_setting/setTaxRate`,
		name: "获取税率",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
    // 获取销售是否含税
    getSaleTax: {
        url: `${config.API_URL}/adminapi/stock.Switch/getSale`,
        name: "获取是否含税",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    // 获取销售是否自动出库
    getSaleWare: {
        url: `${config.API_URL}/adminapi/stock.Switch/getSalesAuto`,
        name: "获取是否自动出库",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    // 获取采购是否含税
    getProduceTax: {
        url: `${config.API_URL}/adminapi/stock.Switch/getPurchase`,
        name: "获取是否含税",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    // 获取采购是否自动入库
    getProduceWare: {
        url: `${config.API_URL}/adminapi/stock.Switch/getPurchaseAuto`,
        name: "获取是否自动入库",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },

    approval: {
		lists: {
			url: `${config.API_URL}/adminapi/flow.Flow/lists`,
			name: "获取审批流程列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	    all: {
		    url: `${config.API_URL}/adminapi/flow.Flow/allFlowList`,
		    name: "获取审批流程列表",
		    get: async function(data={}){
			    return await http.get(this.url, data);
		    }
	    },
		add: {
			url: `${config.API_URL}/adminapi/flow.Flow/add`,
			name: "添加审批流程",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/flow.Flow/edit`,
			name: "编辑审批流程",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/flow.Flow/detail`,
			name: "添加审批流程",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	    getFlowItem: {
		    url: `${config.API_URL}/adminapi/flow.Flow/getFlowItem`,
		    name: "添加审批流程",
		    get: async function(data={}){
			    return await http.get(this.url, data);
		    }
	    },
		delete: {
			url: `${config.API_URL}/adminapi/flow.Flow/delete`,
			name: "删除审批流程",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/flow.Flow/updateStatus`,
			name: "修改审批流程状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
	wx_oa: {
		getConfig: {
			url: `${config.API_URL}/adminapi/channel.official_account_setting/getConfig`,
			name: "获取微信公众号配置",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setConfig: {
			url: `${config.API_URL}/adminapi/channel.official_account_setting/setConfig`,
			name: "设置微信公众号配置",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		getOaMenu: {
			url: `${config.API_URL}/adminapi/channel.official_account_menu/detail`,
			name: "获取公众号菜单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		setOaMenuSave: {
			url: `${config.API_URL}/adminapi/channel.official_account_menu/save`,
			name: "微信公众号菜单保存",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		setOaMenuPublish: {
			url: `${config.API_URL}/adminapi/channel.official_account_menu/saveAndPublish`,
			name: "微信公众号菜单发布",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		getOaReplyList: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/lists`,
			name: "获取回复列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		oaReplyDel: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/delete`,
			name: "回复列表删除",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		changeOaReplyStatus: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/status`,
			name: "回复状态修改",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		oaReplyAdd: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/add`,
			name: "回复添加",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		oaReplyEdit: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/edit`,
			name: "回复编辑",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		getOaReplyDetail: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/detail`,
			name: "获取回复列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
	pushItem:{
		list: {
			url: `${config.API_URL}/adminapi/channel.wxoa_site/lists`,
			name: "获取推送项目列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/channel.wxoa_site/edit`,
			name: "修改推送项目",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/channel.wxoa_site/add`,
			name: "添加推送项目",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/channel.wxoa_site/delete`,
			name: "删除推送项目",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/channel.wxoa_site/detail`,
			name: "修改推送项目",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		getWechatQrcode: {
			url: `${config.API_URL}/adminapi/channel.official_account_reply/getWechatQrcode`,
			name: "获取推送二维码",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
	}
}
